﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Alex.Library.Win32
{
    /// <summary>
    /// 
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct COPYDATASTRUCT
    {
        /// <summary>
        /// 
        /// </summary>
        public IntPtr dwData;
        /// <summary>
        /// 
        /// </summary>
        public int cbData;
        /// <summary>
        /// 
        /// </summary>
        [MarshalAs(UnmanagedType.LPStr)]
        public string lpData;
    }

    /// <summary>
    /// GetMessage函数获取的消息结构
    /// </summary>
    public struct LPMSG
    {
        /// <summary>
        /// 
        /// </summary>
        public int hwnd;
        /// <summary>
        /// 
        /// </summary>
        public uint message;
        /// <summary>
        /// 
        /// </summary>
        public int wParam;
        /// <summary>
        /// 
        /// </summary>
        public long lParam;
        /// <summary>
        /// 
        /// </summary>
        public uint time;
        /// <summary>
        /// 
        /// </summary>
        public int pt;
    }

    /// <summary>
    /// 钩子类型
    /// </summary>
    public enum HookType : int
    {
        /// <summary>
        /// 
        /// </summary>
        WH_JOURNALRECORD = 0,
        /// <summary>
        /// 
        /// </summary>
        WH_JOURNALPLAYBACK = 1,
        /// <summary>
        /// 
        /// </summary>
        WH_KEYBOARD = 2,
        /// <summary>
        /// 
        /// </summary>
        WH_GETMESSAGE = 3,
        /// <summary>
        /// 
        /// </summary>
        WH_CALLWNDPROC = 4,
        /// <summary>
        /// 
        /// </summary>
        WH_CBT = 5,
        /// <summary>
        /// 
        /// </summary>
        WH_SYSMSGFILTER = 6,
        /// <summary>
        /// 
        /// </summary>
        WH_MOUSE = 7,
        /// <summary>
        /// 
        /// </summary>
        WH_HARDWARE = 8,
        /// <summary>
        /// 
        /// </summary>
        WH_DEBUG = 9,
        /// <summary>
        /// 
        /// </summary>
        WH_SHELL = 10,
        /// <summary>
        /// 
        /// </summary>
        WH_FOREGROUNDIDLE = 11,
        /// <summary>
        /// 
        /// </summary>
        WH_CALLWNDPROCRET = 12,
        /// <summary>
        /// 
        /// </summary>
        WH_KEYBOARD_LL = 13,
        /// <summary>
        /// 
        /// </summary>
        WH_MOUSE_LL = 14
    }

    /// <summary>
    /// SetWindowLong函数要替换的窗口信息
    /// </summary>
    public enum WindowLongCode : int
    {
        /// <summary>
        /// 该窗口的窗口函数的地址
        /// </summary>
        GWL_WNDPROC = -4,

        /// <summary>
        /// 拥有窗口的实例的句柄
        /// </summary>
        GWL_HINSTANCE = -6,

        /// <summary>
        /// 窗口扩展样式
        /// </summary>
        GWL_EXSTYLE = -20,

        /// <summary>
        /// 窗口样式
        /// </summary>
        GWL_STYLE = -16,

        /// <summary>
        /// 父窗口的句柄。
        /// </summary>
        GWL_HWNDPARENT = -8,

        /// <summary>
        /// 对话框中一个子窗口的标识符
        /// </summary>
        GWL_ID = -12,

        /// <summary>
        /// 含义由应用程序规定
        /// </summary>
        GWL_USERDATA = -21,

        /// <summary>
        /// 这个窗口的对话框函数地址
        /// </summary>
        DWL_DLGPROC = 4,

        /// <summary>
        /// 在对话框函数中处理的一条消息返回的值
        /// </summary>
        DWL_MSGRESULT = 0,

        /// <summary>
        /// 含义由应用程序规定
        /// </summary>
        DWL_USER = 8
    }

    /// <summary>
    /// ShellExecute函数的命令
    /// </summary>
    public enum ShowCommands : int
    {
        /// <summary>
        /// 隐藏
        /// </summary>
        SW_HIDE = 0,
        /// <summary>
        /// 用最近的大小和位置显示, 激活
        /// </summary>
        SW_SHOWNORMAL = 1,
        /// <summary>
        /// 同 SW_SHOWNORMAL
        /// </summary>
        SW_NORMAL = 1,
        /// <summary>
        /// 最小化, 激活
        /// </summary>
        SW_SHOWMINIMIZED = 2,
        /// <summary>
        /// 最大化, 激活
        /// </summary>
        SW_SHOWMAXIMIZED = 3,
        /// <summary>
        /// 同 SW_SHOWMAXIMIZED
        /// </summary>
        SW_MAXIMIZE = 3,
        /// <summary>
        /// 用最近的大小和位置显示, 不激活
        /// </summary>
        SW_SHOWNOACTIVATE = 4,
        /// <summary>
        /// 同 SW_SHOWNORMAL
        /// </summary>
        SW_SHOW = 5,
        /// <summary>
        /// 最小化, 不激活
        /// </summary>
        SW_MINIMIZE = 6,
        /// <summary>
        /// 同 SW_MINIMIZE
        /// </summary>
        SW_SHOWMINNOACTIVE = 7,
        /// <summary>
        /// 同 SW_SHOWNOACTIVATE
        /// </summary>
        SW_SHOWNA = 8,
        /// <summary>
        /// 同 SW_SHOWNORMAL
        /// </summary>
        SW_RESTORE = 9,
        /// <summary>
        /// 同 SW_SHOWNORMAL
        /// </summary>
        SW_SHOWDEFAULT = 10
    }    

    class Structure
    {
    }
}
